﻿using GamFi.API.Application.Contracts.Country.GetCountries;
using GamFi.API.Application.Features.Queries.Country.GetCountries;
using MediatR;
using Microsoft.AspNetCore.Mvc;

namespace GamFi.API.WEB.Controllers;

[ApiController]
[Route("api/[controller]")]
public class CountryController(IMediator mediator): ControllerBase
{
    [HttpGet("GetCountries")]
    public async Task<GetCountriesResponse> GetCountries(CancellationToken cancellationToken)
        => await mediator.Send(new GetCountriesQuery(), cancellationToken);
}